Attribute VB_Name = "VersionValidationModule"
Const ProgramName = "AutoOffTPaper"    ' The name of program
Const ProgramVersion = 6            ' The version of program

' Call this function in the code block of program loading, for example, Form_Load
' If the return value is True, then continue the program; if the return value is False, then abort execution, program will be updated
Public Function VersionValidation() As Boolean
    Dim oVerMgr As Object

    ' Create TopcolorVerCtrl.VersionManager component for version validation
    Set oVerMgr = CreateObject("TopcolorVerCtrl.VersionManager")
    VersionValidation = oVerMgr.VerifyProgramVersion(ProgramName, ProgramVersion, App.Path)
End Function
